<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改【请填写功能名称】')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-detail-edit" th:object="${detail}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">详情图片分类：</label>
                <div class="col-sm-8">
<!--                    <select name="detailType" class="form-control m-b">-->
<!--                        <option value="">所有</option>-->
<!--                    </select>-->
                    <select name="detailType" th:with="type=${@dict.getType('detail_imgtype')}" class="form-control m-b" required>
                        <option value="">所有</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}">
                        </option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">图片存储地址：</label>
                <div class="col-sm-8">
                    <input name="detailImgurl" th:field="*{detailImgurl}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">图片状态：</label>
                <div class="col-sm-8">
<!--                    <input name="detailImgstate" th:field="*{detailImgstate}" class="form-control" type="text">-->
                    <select name="detailImgstate" th:with="type=${@dict.getType('img_state')}" class="form-control m-b" required>
                        <option value="">所有</option>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}">
                        </option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">图片展示顺序：</label>
                <div class="col-sm-8">
                    <input name="deatailOrder" th:field="*{deatailOrder}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">图片对应id：</label>
                <div class="col-sm-8">
                    <input name="detailToid" th:field="*{detailToid}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">详情跳转地址：</label>
                <div class="col-sm-8">
                    <input name="detailSkipurl" th:field="*{detailSkipurl}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">展示信息：</label>
                <div class="col-sm-8">
                    <input name="showMessage" th:field="*{showMessage}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/detail";
        $("#form-detail-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-detail-edit').serialize());
            }
        }
    </script>
</body>
</html>